package com.caipiao.lottery.core;

import com.caipiao.lottery.config.Config;

public class SYSConstant {
    //YPT时间格式
    public static final String YPT_JTIME_FORMAT = "YYYY-MM-DD hh:mm:ss";
    //时间格式
    public static final String JTIME_FORMAT = "YYYYMMDDhhmmss";
    //单票金额
    public static final int MAX_ONE_TIMES_MONEY = 2000000;
    //支付宝快捷支付
    public static final String ALI_ADDON_PAY_TYPE = "10";
    //缓存用，最大玩法数量
    public static final int MAX_LOTTERY_COUNT = 200;
    //直投下单
    public static final String ZT_ORDER = "自选直投";
    //最近中奖缓存时间
    public static final String INT_RECENT_WIN_COUNT = "20";
    //最近中奖缓存时间
    public static final int INT_RECENT_WIN_CACHE_TIME = 600;
    //充值金额上限
    public static final int MAX_PAY_VALUE = 100000000;
    //订单金额上限
    public static final int MAX_ORDER_VALUE = 100000000;
    //组合遗漏序列个数
    //走势图上点的个数
    public static final int RECENT_MISS_LIST_COUNT = 9;
    //冷热序列个数
    //走势图上柱的个数
    public static final int RECENT_HOT_LIST_COUNT = 9;
    //未使用红包的状态
    public static final String COUPON_TYPE_UNUSED = "1";
    //红包同步成功
    public static final String COUPON_YPT_OP_RESULT_SUCC = "1";
    //红包同步失败
    public static final String COUPON_YPT_OP_RESULT_FAILED = "2";
    //红包同步类型 发送
    public static final String COUPON_YPT_OP_TYPE_VALID = "1";
    //红包同步类型 失效
    public static final String COUPON_YPT_OP_TYPE_EXPIRE = "2";
    //Session心跳时间 秒
    public static int SESSION_HEARTBEAT_TIME = 500;
    //返回客户端列表数量
    public static String LIST_READ_COUNT = "20";
    //返回客户端的数量
    public static int INT_LIST_READ_COUNT = 20;
    //从DB一次性最大读取
    public static String DB_MAX_READ_COUNT = "200";
    //从DB一次性最大读取
    public static int INT_DB_MAX_READ_COUNT = 200;

    public static void Init() {
        try {
            LIST_READ_COUNT = Config.Init.GetPropValue("SYS.DataPageCount");
            INT_LIST_READ_COUNT = Integer.valueOf(LIST_READ_COUNT);
            DB_MAX_READ_COUNT = Config.Init.GetPropValue("SYS.DBDataReadCount");
            INT_DB_MAX_READ_COUNT = Integer.valueOf(DB_MAX_READ_COUNT);
            SESSION_HEARTBEAT_TIME = Integer.valueOf(Config.Init.GetPropValue("SYS.SessionHeartBeatTime"));
        } catch (Exception e) {

        }
    }
}
